;;; core.el -*- lexical-binding: t; -*-
;;
;; This file is part of Modulo.
;;
;; Modulo is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Modulo is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with Modulo.  If not, see <https://www.gnu.org/licenses/>.
;;
;;;

(defvar fmodula-emacs-dir
  (eval-when-compile (file-truename user-emacs-directory))
  "The path to the symlinked fmodula directory.
The path must end in a slash.")

(defvar fmodula-core-dir (concat fmodula-emacs-dir "core/")
  "The root directory of core fmodula files.")

;; NOTE: Replace this with a modules directory when applicable.

(defvar fmodula-local-dir (concat fmodula-emacs-dir ".local/")
  "Root directory for local GNU Emacs files. This will be used as
permanent storage for files which are safe to be shared across
systems.")

;; NOTE: Replace this with a storage point for non-volatile bits.

;; NOTE: Replace this with a storage point for volatile bits.

(defvar fmodula-private-dir
  (or (getenv "MODULODIR")
      (let ((xdg-path
	     (expand-file-name "modulo/"
				 (or (getenv "XDG_CONFIG_HOME")
				     "~/.config"))))
	(if (file-directory-p xdg-path) xdg-path))
      "~/.modulo.d/")
  "Where your private configurations are placed. This must end in a slash.
Respects XDG Directory conventions if ~/.config/modulo/ exists.")

(provide 'core)
;;; core.el ends here
